package com.se.domain.vo;

import cn.hutool.core.annotation.Link;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.se.domain.mysql.ActivityDO;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.data.annotation.Transient;

import java.util.ArrayList;
import java.util.LinkedList;
import java.util.List;

@Data
@NoArgsConstructor
public class ActVO {
    Long actId;
    List<CatVO> cats = new LinkedList<>();
    String title;
    String info;
    String place;
    String startTime;
    String endTime;
    String applyTime;
    String applyEndTime;
    Integer size;
    Integer applyNum;
    Boolean publish;

    List<ImgVO> imgs = new LinkedList<>();

    @JsonIgnore
    List<Long> catIds = new LinkedList<>();
    @JsonIgnore
    List<Long> imgIds = new LinkedList<>();
    public ActVO(ActivityDO activityDO) {
        this.actId = activityDO.getActId();
        this.title = activityDO.getTitle();
        this.info = activityDO.getInfo();
        this.place = activityDO.getPlace();
        this.startTime = activityDO.getStartTime();
        this.endTime = activityDO.getEndTime();
        this.applyTime = activityDO.getApplyTime();
        this.applyEndTime = activityDO.getApplyEndTime();
        this.size = activityDO.getSize();
        this.applyNum = activityDO.getApplyNum();
        this.publish = activityDO.getPublish();
    }
}
